package org.longgang.bean;

import java.io.Serializable;

import org.apache.ibatis.type.Alias;

/**
 * admin
 * @author 
 */
@Alias("admin")
public class Admin implements Serializable {
    /**
     * 管理员id
     */
    private Integer adminid;

    /**
     * 管理员名字
     */
    private String name;

    /**
     * 管理员密码
     */
    private String password;

    /**
     * 备用
     */
    private String b1;

    /**
     * 备用
     */
    private String b2;

    private static final long serialVersionUID = 1L;

    public Integer getAdminId() {
        return adminid;
    }

    public void setAdminId(Integer adminid) {
        this.adminid = adminid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getB1() {
        return b1;
    }

    public void setB1(String b1) {
        this.b1 = b1;
    }

    public String getB2() {
        return b2;
    }

    public void setB2(String b2) {
        this.b2 = b2;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Admin other = (Admin) that;
        return (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getB1() == null ? other.getB1() == null : this.getB1().equals(other.getB1()))
            && (this.getB2() == null ? other.getB2() == null : this.getB2().equals(other.getB2()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getB1() == null) ? 0 : getB1().hashCode());
        result = prime * result + ((getB2() == null) ? 0 : getB2().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", adminid=").append(adminid);
        sb.append(", name=").append(name);
        sb.append(", password=").append(password);
        sb.append(", b1=").append(b1);
        sb.append(", b2=").append(b2);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

	public Admin() {
		super();
	}

	public Admin(Integer adminid, String name, String password, String b1, String b2) {
		super();
		this.adminid = adminid;
		this.name = name;
		this.password = password;
		this.b1 = b1;
		this.b2 = b2;
	}
}